home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / PART_F / VIEWMAN / DATA.S < prev    next >
Encoding:
Text File  |  2001-02-10  |  13.1 KB  |  670 lines

  1. *
  2. *    DATA.S
  3. *
  4.     .include    "equates.s"
  5. *
  6. *    .Data
  7. *
  8. *   .IFF chunks we look for..
  9. *
  10. textiff:
  11.     .dc.b    "FORM"
  12.     .dc.b    "ILBM"
  13.     .dc.b    "BMHD"
  14.     .dc.b    "CMAP"
  15.     .dc.b    "BODY"
  16. *
  17. *  Table for use by binary-to-decimal routine
  18. *
  19. decitab:
  20.     .dc.w    10000
  21.     .dc.w    1000
  22.     .dc.w    100
  23.     .dc.w    10
  24.     .dc.w    1
  25. *    
  26. *
  27. *
  28. *
  29. cexist:
  30.     .dc.w    0        ;=0 if not running a 68030, else -1 if on 68030
  31. vidtyp:
  32.     .dc.w    0        ;=0 if ST, =1 if STe, =2 if TT
  33. *
  34. curbrush:
  35.     .dc.w    0        ;currently selected brush    
  36. *
  37. forceupd:
  38.     .dc.w    0        ;force update if non-zero
  39. relcentx:
  40.     .dc.w    $80        ;mouse relative horz value
  41. relcenty:
  42.     .dc.w    $80        ;mouse relative vert value
  43. constrain:
  44.     .dc.w    0        ;0=none,1=horz,2=vert,-1=init
  45. *
  46. *
  47. *  Filled rectangle data..
  48. *
  49. rectwid:
  50.     .dc.w    1    ;width
  51. recthite:
  52.     .dc.w    1    ;height
  53. rectcol:
  54.     .dc.w    15    ;color
  55. *
  56. *
  57. firstpal:
  58.     .dc.w    -1        ;=-1 if none, else # of 1st brush pal loaded
  59. brushnbr:
  60.     .dc.w    0        ;temp current brush number when loading
  61. *
  62. wblkptr:
  63.     .dc.l    worldblk    ;ptr to next free entry in worldblk
  64. wblkcur:
  65.     .dc.l    worldblk    ;ptr to current priority in worldblk
  66. *
  67. *
  68. *  Error report message strings..
  69. *
  70. errptrs:
  71.     dc.l    errmsg2        ;file not found
  72.     dc.l    errmsg3        ;read error
  73.     dc.l    errmsg4        ;not .iff
  74.     dc.l    errmsg5        ;not 16 color mode
  75. *
  76. *  Search 1st & next allocation..
  77. *
  78. dma:
  79.     .dc.b    0,0,0,0,0,0,0,0
  80.     .dc.b    0,0,0,0,0,0,0,0
  81.     .dc.b    0,0,0,0,0,0,0,0
  82.     .dc.b    0,0,0,0,0,0
  83. nexfile:
  84.     .dc.b    0,0,0,0,0,0,0,0
  85.     .dc.b    0,0,0,0,0,0,0,0
  86.     .dc.b    0,0,0,0,0,0,0,0
  87. *
  88. *******************************************************
  89. *
  90. *   Here's where strings go,
  91. *       All initialized data after this is not word-aligned..
  92. *
  93. version:
  94.     dc.b    "  ViewMaster v.0.9e ",0
  95. *
  96. bshpath:
  97.     dc.b    "BRUSH.LST",0
  98. blistrng:
  99.     dc.b    cr,lf
  100.     dc.b    "        Brush List"
  101.     dc.b    cr,lf,cr,lf
  102.     dc.b    "#",tab,"Filename",tab,"Symbol"
  103.     dc.b    cr,lf
  104.     dc.b    "---",tab,"--------",tab,"------"
  105.     dc.b    cr,lf,0
  106. world_ID:
  107.     dc.b    "UNTITLED.WLD",0
  108.     dc.b    0,0,0,0,0,0,0
  109.     dc.b    0,0,0,0,0,0,0,0,0,0
  110.     dc.b    0,0,0,0,0,0,0,0,0,0
  111.     dc.b    0,0,0,0,0,0,0,0,0,0
  112.     dc.b    0,0,0,0,0,0,0,0,0,0
  113.     dc.b    0,0,0,0,0,0,0,0,0,0
  114.     dc.b    0,0,0,0,0,0,0,0,0,0
  115. *
  116. *
  117. *
  118. infostrng:
  119.     .dc.b    "H: "
  120. infox:
  121.     .dc.b    "00000"
  122.     .dc.b    " V: "
  123. infoy:
  124.     .dc.b    "00000",0
  125. *
  126. priormsg:
  127.     .dc.b    "Priority: "
  128. priorma:
  129.     .dc.b    "01234567890123456789",0
  130. *
  131. *
  132. clust_msg:
  133.     dc.b    "CLUSTER: Select #"
  134. clust_nbr:
  135.     dc.b    "00000",0
  136. bridg_msg:
  137.     dc.b    " BRIDGE: Select #"
  138. bridg_nbr:
  139.     dc.b    "00000",0
  140. cxit_msg:
  141.     dc.b    "CLUSTER/BRIDGE abort",0
  142. rectabrt:
  143.     dc.b    "RECT FILL abort",0
  144. clustrng:
  145.     dc.b    "CLUSTER_0",0
  146. bridstrng:
  147.     dc.b    "BRIDGE_0",0
  148. rectmsg:
  149.     .dc.b    "Sizing FILLED RECTANGLE...",0
  150.  
  151. *
  152. *
  153. wwhead:
  154.     dc.b    cr,lf
  155.     dc.b    ";",cr,lf
  156.     dc.b    "; Object List",cr,lf
  157.     dc.b    ";",cr,lf,0
  158. symhead:
  159.     dc.b    ";",cr,lf
  160.     dc.b    tab,".byte",tab,0
  161. symtail:
  162.     dc.b    cr,lf
  163.     dc.b    tab,".byte",tab,0
  164. hposhead:
  165.     dc.b    tab,tab,"; Effects",cr,lf
  166.     dc.b    tab,".word",tab,0
  167. vposhead:
  168.     dc.b    tab,tab,"; Horz",cr,lf
  169.     dc.b    tab,".word",tab,0
  170. vpostail:
  171.     dc.b    tab,tab,"; Vert",cr,lf,0
  172. *
  173. boxmsg0:
  174.     dc.b    tab,tab,"; color",cr,lf
  175.     dc.b    tab,".byte",tab,"FillRect",tab
  176.     dc.b    "; Filled rectangle",cr,lf
  177.     dc.b    tab,".word",tab,0
  178. boxmsg1:
  179.     dc.b    tab,".word",tab,0
  180. boxmsg2:
  181.     dc.b    tab,tab,"; Width",cr,lf
  182.     dc.b    tab,".word",tab,0
  183. boxmsg3:
  184.     dc.b    tab,tab,"; Height",cr,lf,0
  185.  
  186. whead:
  187.     dc.b    ";",cr,lf
  188.     dc.b    ";  -- World Brush List --",cr,lf
  189.     dc.b    ";",cr,lf
  190.     dc.b    ";",cr,lf
  191.     dc.b    tab,".word",tab,0
  192. whead1:
  193.     dc.b    tab,tab,"; World width in pixels",cr,lf
  194.     dc.b    tab,".word",tab,0
  195. whead2:
  196.     dc.b    tab,tab,"; World height",cr,lf
  197.     dc.b    ";",cr,lf
  198.     dc.b    tab,".byte",tab,0
  199. whead2a:
  200.     dc.b    tab,tab,"; Source of World Palette",cr,lf
  201. floorhd:
  202.     dc.b    ";",cr,lf
  203.     dc.b    ";   Floor tile used for this world:",cr,lf
  204.     dc.b    ";",cr,lf
  205.     dc.b    tab,".byte",tab,0
  206. nullname:
  207.     dc.b    "NullFloor",tab,"; No floor tile used",0
  208. floorxhd:
  209.     dc.b    cr,lf
  210.     dc.b    tab,".word",tab,0
  211. *
  212. cluhead:
  213.     dc.b    ";",cr,lf
  214.     dc.b    ";  -- Cluster Description --",cr,lf
  215.     dc.b    ";",cr,lf
  216.     dc.b    ";",cr,lf,0
  217. *
  218. tilhead:
  219.     dc.b    ";",cr,lf
  220.     dc.b    ";  -- World Tile Array --",cr,lf
  221.     dc.b    ";",cr,lf
  222.     dc.b    ";",cr,lf
  223.     dc.b    ";   Made up of ",0
  224. tilhead0:
  225.     dc.b    " tiles (and ",0
  226. tilhead5:
  227.     dc.b    " holes) of ",0
  228. tilhead1:
  229.     dc.b    "x",0
  230. tilhead2:
  231.     dc.b    " pixels each,",cr,lf
  232.     dc.b    ";   arranged in an array of ",0
  233. tilhead3:
  234.     dc.b    " tiles across by ",0
  235. tilhead4:
  236.     dc.b    " tiles down.",cr,lf
  237.     dc.b    ";",cr,lf    
  238.     dc.b    ";",0
  239. nulltile:
  240.     dc.b    "NULL",0
  241. tilcrlf:        
  242.     dc.b    cr,lf,tab,".word",tab,0
  243. *
  244. *
  245. *    
  246. errmsg0:
  247.     dc.b    "-- Brushes Error Report --",cr,lf,cr,lf,0
  248. errmsg1:
  249.     dc.b    "Read Error on BRUSH.LST file",cr,lf,0    
  250. errmsg2:
  251.     dc.b    cr,lf,cr,lf
  252.     dc.b    "Brush File(s) not found on:",cr,lf
  253.     dc.b    "   ",0
  254. *
  255. errmsg3:
  256.     dc.b    cr,lf,cr,lf
  257.     dc.b    "Brush File(s) read error on:",cr,lf
  258.     dc.b    "   ",0
  259. *
  260. errmsg4:
  261.     dc.b    cr,lf,cr,lf
  262.     dc.b    "Brush File(s) not .IFF format on:",cr,lf
  263.     dc.b    "   ",0
  264. *
  265. errmsg5:
  266.     dc.b    cr,lf,cr,lf
  267.     dc.b    "Brush File(s) not 16 color mode on:",cr,lf
  268.     dc.b    "   ",0
  269. *
  270. aggr_msg:
  271.     dc.b    "   Aggregate Mode  ",0
  272. *
  273. *  This is the list of keyword symbols we look for
  274. *
  275. keywords:
  276.     dc.b    "Hflip",0    ;symbol (null terminated)
  277.     dc.b    Hflip        ;symbol value (hi byte = 0)
  278. *
  279.     dc.b    "Vflip",0
  280.     dc.b    Vflip
  281. *
  282.     dc.b    "HVflip",0
  283.     dc.b    Hflip+Vflip
  284. *
  285. Astrng:
  286.     dc.b    "Alternate",0
  287.     dc.b    Alternate
  288. Hstrng:
  289.     dc.b    "Hbridge",0
  290.     dc.b    Hbridge
  291. *
  292. Vstrng:
  293.     dc.b    "Vbridge",0
  294.     dc.b    Vbridge
  295. *
  296. Fillstrng:
  297.     dc.b    "FillRect",0
  298.     dc.b    FillRect
  299. *
  300.     dc.b    "NullFloor",0
  301.     dc.b    -1
  302. *
  303. *  list terminator
  304. *
  305.     dc.b    0
  306. *
  307. *
  308. *******************************************************
  309. *
  310. *    Uninitialized Ram allocation
  311. *
  312.     .bss
  313. ;
  314. maxbrshwid:
  315.     ds.w    1    ;pixel width of widest brush (library build)
  316. maxhite:
  317.     .ds.w    1    ;pixel height of tallest brush (lib build)
  318. *
  319. aggreg:
  320.     ds.w    1    ;aggregate counter
  321. *
  322. butt:
  323.     ds.w    1    ;toggle used for palette switch (may be obsolite)
  324. butnptr:
  325.     ds.l    1    ;lineA ptr to system mouse button variable
  326. mouseptr:
  327.     ds.l    1    ;lineA ptr to system mouse position variables
  328. mousex:
  329.     ds.w    1    ;mouse position, horz
  330. mousey:
  331.     ds.w    1    ;mouse position, vert
  332. *
  333. *  Screen characteristics
  334. *
  335. *   The following four items must be in order and contiguous
  336. *
  337. oldphyz:
  338.     .ds.l    1    ;base ptr to screen (we don't double buffer)
  339. scr_nxwd:
  340.     .ds.w    1    ;screen BLT d_nxwd
  341. scr_nxln:
  342.     .ds.w    1
  343. scr_nxpl:
  344.     .ds.w    1
  345. *
  346. *
  347. oldrez:
  348.     .ds.w    1    ;current hardware resolution
  349. old_wid:
  350.     .ds.w    1    ;width of last world built by "makewld"
  351. old_hite:
  352.     .ds.w    1    ;height of last world built by "makewld"
  353. old_wrap:
  354.     .ds.w    1    ;wrap of last world built by "makewld"
  355. handle:
  356.     .ds.w    1    ;file I/O handle
  357. intrinscnt:
  358.     .ds.w    1    ;# of intrinsic brushes loaded
  359. maxintrins:
  360.     .ds.w    1    ;highest intrinsic brush #, higher means derived
  361. maxderivd:
  362.     .ds.w    1    ;highest derived brush #
  363. *
  364. *
  365. w_wrap:
  366.     .ds.w    1    ;temp BLT form_wrap variable
  367. *
  368. *
  369. *
  370. *  Minimum sized form for cluster 
  371. *
  372. xmin_clust:
  373.     ds.w    1    ;world co-ordinates
  374. ymin_clust:
  375.     ds.w    1
  376. xmax_clust:
  377.     ds.w    1    ;xpos +1
  378. ymax_clust:
  379.     ds.w    1    ;ypos +1
  380. *
  381. *
  382. *
  383. *  screen clip parms for BLT routine
  384. *
  385. xmin_clp:
  386.     ds.w    1    ;screen co-ords
  387. ymin_clp:
  388.     ds.w    1
  389. xmax_clp:
  390.     ds.w    1    ;xpos +1
  391. ymax_clp:
  392.     ds.w    1    ;ypos +1
  393. *
  394. *
  395. *  Current motion clip variables
  396. *
  397. Mclpxmn:
  398.     ds.w    1    ;brush motion clip, screen co-ords
  399. Mclpymn:
  400.     ds.w    1
  401. Mclpxmx:
  402.     ds.w    1
  403. Mclpymx:
  404.     ds.w    1
  405. *
  406. *
  407. *
  408. *  subtile build ram..
  409. *
  410. subtilnm:
  411.     .ds.w    1    ;starting number appended to subtile names
  412. subtilx:
  413.     .ds.w    1    ;leftmost subTile horz offset    
  414. subtily:
  415.     .ds.w    1    ;topmost subTile vert offset    
  416. subtilw:
  417.     .ds.w    1    ;image width of a subtile    
  418. subtilh:
  419.     .ds.w    1    ;image height of a subtile
  420. subtilcx:
  421.     .ds.w    1    ;# of subtiles in row
  422. subtilcy:
  423.     .ds.w    1    ;# of subtiles in column
  424.  
  425. *
  426. xgridoff:
  427.     .ds.w    1    ;horz signed grid accum til next grid pt 
  428. ygridoff:
  429.     .ds.w    1    ;vert signed grid accum til next grid pt
  430. *
  431. *
  432. *  Current Brush data:
  433. *
  434. bsh_x:
  435.     ds.w    1    ;screen co-ords for brush cursor
  436. bsh_y:
  437.     ds.w    1
  438. bsh_wid:
  439.     ds.w    1
  440. bsh_hite:
  441.     ds.w    1
  442. bsh_monoln:
  443.     ds.w    1    ;s_nxln for mono mask of brush
  444. *
  445. *
  446. *
  447. bitblock:
  448.     ds.b    76        ;BLT from intermediate to screen
  449. wbblock:
  450.     ds.b    76        ;BLT from bshblock to world
  451. wbmblock:
  452.     ds.b    76        ;BLT from bshblock to worldmsk
  453. mask2i:
  454.     ds.b    76        ;BLT from bshblock to intermediate
  455. clustblt:
  456.     ds.b    76        ;blit bshblock to cluster form
  457. subTblt:
  458.     ds.b    76        ;subtile blt block
  459. *
  460. *
  461. BUT_ADDR:    ds.l    1    ;exchange mouse button vector old addr
  462. BUT_STATE:    ds.w    1    ;new button vector local data save
  463. *
  464. MOV_ADDR:    ds.l    1    ; Old address of mouse movement vector
  465. *
  466. *
  467. oldpal:
  468.     ds.w    16        ;desk top palette at start-up (to be restored)
  469. ;
  470. ;
  471. *
  472. rowxtile:
  473.     ds.w    1        ;x pos of current row key (leftmost) tile
  474. rowytile:
  475.     ds.w    1        ;y pos of current row key (leftmost) tile
  476. *
  477. keyz:
  478.     ds.w    1    ;this is a shadow of cntrl key flags
  479. grid:
  480.     ds.w    1    ;=0 if not in grid mode, else in grid mode
  481. blistexist:
  482.     ds.w    1    ;=0 if BRUSH.LST file non-existant
  483. *
  484. *
  485. BshEnvir:
  486.     .ds.l    1    ;ptr to User-Defined brush enviroment string
  487. brshfile:
  488.     .ds.b    100    ;various paths are built here
  489. BshListPath:
  490.     .ds.b    100    ;"BRUSH.LST" path only is built here
  491. tempbuf:
  492.     .ds.b    100    ;a temporary storage location
  493. ;
  494. ;
  495. ;
  496. ;  text file image of BRUSH.LST..
  497. ;
  498. ;   an entry in this list is a text string terminated by a <cr>
  499. ;   containing the decimal object #, the filename of the .IFF brush
  500. ;   and the symbolic name to be used.
  501. ;
  502. ;    "23    turrwall.bsh    OBJ_23"
  503. ;
  504. brushlst:
  505.     ds.b    bshbufz        ;enough for biggest BRUSH.LST
  506. ;
  507. ;
  508. ;
  509. ;  Brush Block
  510. ;
  511. ;   this is a list of brush descriptor blocks for all available brushes
  512. ;   and is generated from the Brush List
  513. ;
  514. ;  an entry here looks like:
  515. ;
  516. ;    Size    Name        Description
  517. ;
  518. ;    .W    b_width        width of graphics object in pixels
  519. ;    .W    b_height    height of graphics object in pixels
  520. ;    .L    s_form        pointer to head of graphics data
  521. ;    .L    id_string    ptr to symbol name ID string if intrinsic/link ptr if derived
  522. ;    .W    mask_off    offset from s_form to mask base addr
  523. ;    .W    s_nxln        offset to next line in plane (# bytes)
  524. ;
  525. ;        s_nxwd <= 2
  526. ;        s_nxpl <= s_nxln / 4
  527. bshblock:
  528.     ds.b    maxBSHnbr*16    ;enough for all intrinsic brush entries
  529. *
  530. *
  531. *
  532. palblock:
  533.     ds.b    maxBSHnbr*32    ;a palette for each intrinsic brush
  534. *
  535. *  The following 9 words must be found in every world.wld file
  536. *
  537. wfile:
  538. new_wid:
  539.     ds.w    1    ;world width 
  540. new_hite:
  541.     ds.w    1    ;world height when read in from file
  542. *
  543. worldpal:
  544.     ds.w    1    ;object where world's palette comes from
  545. worldtile:
  546.     ds.w    1    ;brush # of floor tile (-1 if none & skip next 6)
  547. *
  548. initxtile:
  549.     ds.w    1    ;initial x position of key tile
  550. initytile:
  551.     ds.w    1    ;initial y position of key tile
  552. *
  553. rowthoff:
  554.     ds.w    1    ;horz offset of next tile in row
  555. rowtvoff:
  556.     ds.w    1    ;vert offset of next tile in row
  557. colthoff:
  558.     ds.w    1    ;horz offset of next tile in column
  559. coltvoff:
  560.     ds.w    1    ;vert offset of next tile in column
  561.  
  562. ;
  563. ;  This is a machine readable version of the world list descriptor.
  564. ;
  565. ;    While in draw mode, both intrinsic and derived brushes
  566. ;    may appear in this list.  However, when read or written
  567. ;    as a .WLD file, derived brushes must be converted to
  568. ;    their intrinsic equivalents.
  569. ;
  570. ;    Size    Name        Description
  571. ;
  572. ;    .W    Obj#        Brush number
  573. ;    .W    Spec_eff    Special effects (to be defined)
  574. ;    .W    Hpos        Horizontal position in the world
  575. ;    .W    Vpos        Vertical position in the world    
  576. ;
  577. worldblk:
  578.     ds.b    maxWLDnbr*8    ;enough for all world entries
  579. *
  580. *   This is the same as worldblk but used to build the library instead
  581. *
  582. libblock:
  583.     ds.b    maxBSHnbr*8    ;enough for all brushes
  584. liblkptr:
  585.     ds.l    1        ;ptr to just beyond last entry
  586. *
  587. *
  588. *
  589. *    An entry here describes the components of a derived brush
  590. *
  591. *    an entry here looks like:
  592. *
  593. *    Size    Name        Description
  594. *
  595. *    .L    id_string    New, derived symbol name string
  596. *    .W    count        Number of derived brushes that follow    
  597. *
  598. *  the next 6 words are repeated "count" times..
  599. *
  600. *    .W    brush_nbr    intrinsic brush # from which derived
  601. *    .W    Spec_eff    Hflip, Vflip, Bridge
  602. *    .W    h_off        horizontal offset from previous brush
  603. *    .W    v_off        vertical offset from previous brush
  604. *    .W    width        new width (if needed)
  605. *    .W    height        new height (if needed)
  606. *
  607. derivblk:
  608.     ds.b    10000        ;large enough for all derivations needed
  609. derblkend:
  610.     ds.l    1        ;ptr to next new entry
  611. *
  612. *
  613. *
  614. dstrng:
  615.     ds.b    10000        ;here's where we build our derived ID's
  616. dstrngend:
  617.     ds.l    1        ;ptr to next avilable entry
  618. *
  619. *  Here's where we copy our brush for SRC masking
  620. *
  621. grafbsh:
  622.     ds.b    maxBSHsize
  623. grafmsk:
  624.     ds.b    maxBSHsize/4
  625. *
  626. *
  627. *
  628. *
  629. *   Here's where the screen stuff under a cursor-brush is kept.
  630. *
  631. *    This buffer is used by file I/O & error report generator
  632. *    when not in use for moving a cursor-brush 
  633. *
  634. undform:
  635.     ds.l    1        ;screen ptr where splat begins
  636. undhite:
  637.     ds.w    1        ;# of lines, height (-1)
  638. undspan:
  639.     ds.w    1        ;# bytes to add to ptr between lines
  640. undwid:
  641.     ds.w    1        ;# of long words (-1) in a line)
  642. undbuf:
  643.     ds.b    maxBSHsize    ;enough for a brush the size of LYNX
  644. *
  645. *
  646. *
  647. *
  648. *  Here are the pointers to our Malloc'd ram buffers:
  649. *
  650. bshgraf:
  651.     .ds.l    1    ;base of intrinsic brush graphics & masks buffer
  652. library:
  653.     .ds.l    1    ;base of the intrinsic brush library graphics form
  654. *
  655. world:
  656.     .ds.l    1    ;base of world graphics form
  657. worldmsk:
  658.     .ds.l    1    ;base of world graphics mask form
  659. *
  660. derivdgraf:
  661.     .ds.l    1    ;base of derived brush graphics & masks buffer
  662. derivdend:
  663.     .ds.l    1    ;next free spot where a new derived brush can be built
  664. *
  665. malloend:
  666.     .ds.l    1    ;ptr to just beyond our Malloc'd memory
  667. *
  668.     .end
  669.